<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <link rel="stylesheet" href="./manifest.json" />
  </head>
  <body>
    <h1>Hello World</h1>
    <script>
      if ("serviceWorker" in navigator) {
        window.addEventListener("load", function () {
          navigator.serviceWorker
            .register("sw.js", { scope: "./" })
            .then(function (registration) {
              console.log(
                "serviceWorker registeantion successful with scope:",
                registration.scope
              );
            })
            .catch(function (err) {
              console.log("serviceWorker registeantion failed", err);
            });
        });
      }
    </script>
  </body>
</html>
